<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>新增修改</title>
</head>
<body>
<form action="addOrUpdate" method="post">
<table border="1px">
    <tr>
        <td>书名：</td>
        <td><input type="text" name="name" th:value="${show.name}"></td>
    </tr>
    <tr>
        <td>价格：</td>
        <td><input type="text" name="price" th:value="${show.price}"></td>
    </tr>
    <tr>
        <td>类目:</td>
        <td>
            <input type="text" name="category" th:value="${show.category}">
        </td>
    </tr>
    <tr>
        <td>库存:</td>
        <td>
            <input type="text" name="pnum" th:value="${show.pnum}">
        </td>
    </tr>
    <tr>
        <td>图片:</td>
        <td>
            <input type="text" name="imgurl" th:value="${show.imgurl}">
        </td>
    </tr>
    <tr>
        <td>说明:</td>
        <td>
            <input type="text" name="description" th:value="${show.description}" >
        </td>
    </tr>
    <tr>
        <td>作者:</td>
        <td>
            <input type="text" name="author" th:value="${show.author}">
        </td>
    </tr>
    <tr th:if="${show.id!=null}">
        <td>已售:</td>
        <td>
            <input type="text" name="sales" th:value="${show.sales}">
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <input type="submit" value="提交">
            <a href="javascript:history.back()">返回</a>
        </td>
    </tr>
</table>
</form>
</body>
</html>